fix(desktop): mitigate Chromium AX renderer crash and harden recovery - #1002
Merged
Merged
Conversation
Chromium has a known CHECK failure in AXBlockFlowData::ComputeNeighborOnLine (chromium #552018997, #549525849) that kills the renderer when an assistive technology client reads the accessibility tree while the DOM is being mutated. This is the exact scenario during streaming agent responses and affects both Windows and macOS across Electron 41–43 / Chromium 146–152. Short-term: add --disable-renderer-accessibility at startup to prevent Chromium from building the in-renderer accessibility tree unless the user explicitly opts in. This eliminates the crash trigger for users who do not rely on screen readers. Medium-term: add a crash-loop cooldown (2 s) to renderer recovery so that repeated rapid crashes produce a brief blank rather than a tight reload loop. The first crash still reloads immediately; subsequent crashes within the cooldown window are delayed. Upstream tracking: - https://issues.chromium.org/552018997 - https://issues.chromium.org/549525849
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Chromium has a known CHECK failure in
AXBlockFlowData::ComputeNeighborOnLine(chromium #552018997, #549525849) that kills the renderer when an AT client reads the accessibility tree while the DOM is mutated — exactly what happens during streaming agent responses.Short-term: add
--disable-renderer-accessibilityat startup to prevent the crash trigger for users not relying on screen readers.Medium-term: add a 2 s crash-loop cooldown to renderer recovery so repeated rapid crashes produce a brief blank instead of a tight reload loop.
Changes
index.ts—app.commandLine.appendSwitch("disable-renderer-accessibility")beforeapp.whenReady()renderer-recovery.ts— cooldown logic (first crash reloads immediately, subsequent ones within 2 s are delayed)renderer-recovery.test.mjs— 5 tests (was 3), covering cooldown behaviorTested
node --test apps/desktop/test/renderer-recovery.test.mjs— 5/5 passtsc --noEmit— cleanUpstream tracking